﻿DIP switch settings moved to 0xC00.  These are editable without recomputing the checksum!
DIP reference
8000	controller setting
	8000	joystick
	0000	N64 controller; ironically the stick isn't used, only the +pad
6000	scrolling
	6000	normal
	4000	slow
	2000	fast
	0000	very fast
1800	lives
	18	3
	10	4
	08	2
	00	1
0700	coin settings
	0700	1 coin /1 credit
	0600	1 coin /2 credits
	0500	1 coin /3 credits
	0400	1 coin /4 credits
	0300	2 coins/1 credit
	0200	3 coins/1 credit
	0100	4 coins/1 credit
	0000	5 coins/1 credit
0040	language
	0040	English
	0000	Japanese
0020	sound in attract mode
	0020	off
	0000	on
0010	rapid fire
	0010	on
	0000	off
000C	bonus credits
	000C	3000000 +1 credit
	0008	5000000 +1 credit
	0004	7000000 +1 credit
	0000	disabled
0003	difficulty
	0003	normal
	0002	easy
	0001	hard
	0000	very hard

80000400()	0x1000	initialize program
3C088008	LUI	T0,8008
3C09800C	LUI	T1,800C
25084020	ADDIU	T0,T0,4020
252A5FF0	ADDIU	T2,T1,5FF0
AD000000	SW	R0,0000 (T0)
AD000004	SW	R0,0004 (T0)
150AFFFD	BNE	T0,T2,-3
21080008	ADDI	T0,T0,0008
3C031000	LUI	V1,1000
3C01A460	LUI	AT,A460
240201C0	ADDIU	V0,R0,01C0
24630C00	ADDIU	V1,V1,0C00
AC220000	SW	V0,0000 (AT)
AC230004	SW	V1,0004 (AT)
24020010	ADDIU	V0,R0,0010
3C0A8005	LUI	T2,8005
AC22000C	SW	V0,000C (AT)
254A7D00	ADDIU	T2,T2,7D00
01400008	JR	T2
253D26A8	ADDIU	SP,T1,26A8

@80053EC0	0x54AC0
3C17A000	LUI	S7,A000
...
@80053EE4	0x54AE4
36F701CA	ORI	S7,S7,01CA

@8005769C	0x5829C
3C0EA000	LUI	T6,A000
95C201C2	LHU	V0,01C2 (T6)
...
@800576D8	0x582D8
3C18A000	LUI	T8,A000
A5390002	SH	T9,0002 (T1)
970201C4	LHU	V0,01C4 (T8)

800577CC()	0x583CC	800AC2CC = DIP switches
3C0EA000	LUI	T6,A000
95CF01C0	LHU	T7,01C0 (T6)
3C01800B	LUI	AT,800B
01E0C027	NOR	T8,T7,R0
03E00008	JR	RA
A438C2CC	SH	T8,C2CC (AT)

@80057810	0x58410
3C0EA000	LUI	T6,A000
95C201C4	LHU	V0,01C4 (T6)
...
@80057B34	0x58734
3C0EA000	LUI	T6,A000
...
@80057B74	0x58774
A5CD01CA	SH	T5,01CA (T6)

  Now to map controller input to the hardware triggers and remap R & c-right.
  On N64, R is rolling, c-down speed, A normal attack, Z exarms atk 1, B exarms atk 2

80085A4C	controller input; +6 each

800AC2C0	P1 joystick feed
800AC2C2	P2 joystick feed
800AC2C4	previous P1 joystick feed
800AC2C6	previous P2 joystick feed
	100	start
	0F0	buttons 4-1
	00F	directions
800AC2C8
800AC2CC	inverted DIP switches
800AC2CE	True if test button pressed	[0x20]
800AC2D0	True if test button newly pressed
800AC2D2	True if service button pressed	[0x10]
800AC2D4	True if service button newly pressed
800AC2D6

800AC320	previous state of test button
800AC322	previous state of service button

800577E4()	tests for service, test

Okay, so the test button does nothing and service button simply adds a credit without timeout.
Although mapping everything is +cool+, just safely map service to avoid credit timeout errors.
Do it over the test for +pad returning static values (which doesn't happen on an N64 w/o user input).
Happily, L is stupid to use in this game.  Also could overmap on Start.  Don't bother cleaning up the (now pointless) code.
@8000DD4C:
	if all + pressed, @V0+45 nonzero
	masks away the the +pad
	if @800AC2CE: controller input | 0080	(fake flag)
@8000DD40	0xE940	might as well burn some cycles; takes a while for MULTU to generate its value anyway
3C08A000	LUI	T0,A000
2409FFFF	ADDIU	T1,R0,FFFF
A50901C4	SH	T1,01C4 (T0)
@8000DD4C	0xE94C
02350019	MULTU	S1,S5
00004012	MFLO	T0
02482021	ADDU	A0,S2,T0
9489002C	LHU	T1,002C (A0)
02330019	MULTU	S1,S3
312A0020	ANDI	T2,T1,0020
11400003	BEQ	T2,R0,+3
3C0BA000	LUI	T3,A000
240AFFEF	ADDIU	T2,R0,FFEF
A56A01C4	SH	T2,01C4 (T3)
...
@8000DDF4	0xE9F4	push loop forward
1420FFD5	BNE	AT,R0,8000DD4C

  The controller mapping is a little weird.  Fix?  It's not really that bad since you don't need to set speed often.
button 1	A	fire
button 2	B	roll
button 3	R	exarms
button 4	c-right	speed toggle

  Wow, they compiled in the Leo initialization stuff ;*)
